package com.foo.designpattern.decorator;

/**
 * @author jiang
 * @date 2016-04-12 23:05:36
 * @description 装饰模式：装饰角色
 */
public class Decorator implements Component {
    private Component component;

    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void sampleOperation() {
        // 委派给构件
        component.sampleOperation();
    }

}
